/*----------------------------------------------------------------------------*/
//
// pconfig.hpp- PEG configuration flags.
//
// Author: Kenneth G. Maxwell
//
// Copyright (c) 1997-2008 Swell Software 
//           All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
// These flags control which features are included in your PEG library.
// When any of these flags are changed, you must rebuilt your working version
// of the library.
//
// These flags also define the target operating system, input devices,
// and to some extent the target video controller.
//
/*----------------------------------------------------------------------------*/
#define PEG_PLUS

/*----------------------------------------------------------------------------*/
// Target RTOS Configuration
/*----------------------------------------------------------------------------*/
#define LINUXPEG
#define POSIXPEG

/*----------------------------------------------------------------------------*/
// Target Screen Driver Configuration
/*----------------------------------------------------------------------------*/
#define PSCREEN             "lfbscrn16.hpp"

// End of Target build

/*----------------------------------------------------------------------------*/
// General RTOS Configuration
/*----------------------------------------------------------------------------*/
#define PEG_PRIORITY                      0
#define PEG_HEAP_SIZE               8192000
#define PEG_STACK_SIZE               102400
#define PEG_ONE_SECOND                   20


/*----------------------------------------------------------------------------*/
// General Screen Driver Configuration
/*----------------------------------------------------------------------------*/


// #define PEG_PRODUCT_KEY_HANDLER ProductKeyHandler


#define PEG_DEFAULT_VIRTUAL_XSIZE               800
#define PEG_DEFAULT_VIRTUAL_YSIZE               600
#define PEG_DOUBLE_BUFFER
#define PEG_MAX_DRAW_NESTING             20

/*----------------------------------------------------------------------------*/
// Orientation (screen rotation) modes
/*----------------------------------------------------------------------------*/
#define PEG_ORIENTATION_NATIVE            0
#define PEG_ORIENTATION_ROTATE_CW         1
#define PEG_ORIENTATION_ROTATE_CCW        2

#define PEG_ORIENTATION  PEG_ORIENTATION_NATIVE


/*----------------------------------------------------------------------------*/
// Target CPU Configuration
/*----------------------------------------------------------------------------*/
#define PEG_CPU_ARM9
#define PEGFAR


/*----------------------------------------------------------------------------*/
// Color Depth Configuration
/*----------------------------------------------------------------------------*/
#define PEG_NUM_COLORS                65535
#define PEG_NUM_PAL_ENTRIES             248
#define PEG_GRAYSCALE_PAL_START         232
#define PEG_RGB_USE_565


/*----------------------------------------------------------------------------*/
// Standard Color Defeines
/*----------------------------------------------------------------------------*/
#define PEG_DEF_TRANSPARENCY  0x0001
#define PEG_DEF_BLACK           0x0000
#define PEG_DEF_RED             0xb800
#define PEG_DEF_GREEN           0x05e0
#define PEG_DEF_BROWN           0xbde0
#define PEG_DEF_BLUE            0x0017
#define PEG_DEF_MAGENTA         0xb817
#define PEG_DEF_CYAN            0x05f7
#define PEG_DEF_LIGHTGRAY       0xc618
#define PEG_DEF_DARKGRAY        0x8410
#define PEG_DEF_LIGHTRED        0xf800
#define PEG_DEF_LIGHTGREEN      0x07e0
#define PEG_DEF_YELLOW          0xffe0
#define PEG_DEF_LIGHTBLUE       0x001f
#define PEG_DEF_LIGHTMAGENTA    0xf81f
#define PEG_DEF_LIGHTCYAN       0x07ff
#define PEG_DEF_WHITE           0xffff


/*----------------------------------------------------------------------------*/
// Input Device Configuration
/*----------------------------------------------------------------------------*/
#define PEG_TOUCH_SUPPORT
#define PEG_TOUCH_SUPPORT_INCLUDE_CALIBRATION
#define PEG_TOUCH_INCLUDE "linuxpegtouchdev.hpp"

//NOTE: mouse support appears to introduce some trouble with classes whose mReals start at 0,0. Not sure why. We get a segmentation fault at draw time from pscreen.
//#define PEG_MOUSE_SUPPORT
//#define PEG_MOUSE_INCLUDE "linuxpegmousedev.hpp"

//special custom devices that can have several instances.
#define PEG_MISC_SUPPORT
#define PEG_MISC_INCLUDE "linuxpegmiscdev.hpp"
#define PEG_MISC_MAX_DEVS 10

#define PEG_MULT_SOFT_SURFACES
#define PEG_FRAMEBUFFER_DEV "/dev/fb0"
/*----------------------------------------------------------------------------*/
// Printer Configuration
/*----------------------------------------------------------------------------*/


/*----------------------------------------------------------------------------*/
// Drawing Configuration
/*----------------------------------------------------------------------------*/
#define PEG_FULL_GRAPHICS
#define PEG_VIEWPORTS
#define PEG_ARC_GRAPHICS
#define PEG_FULL_CLIPPING
#define PEG_AA_LINE
#define PEG_IMAGE_SCALING
#define PEG_SS_BORDER                     6
#define PEG_SS_HEADER_SPACE               4
#define PEG_SS_CELL_PADDING               8
#define PEG_SS_CELL_SPACING               0
#define PEG_SS_SEPARATOR_WIDTH            4
#define PEG_SS_MAX_HEADER_LINES           4

#define PEG_TBUTTON_PADDING               3
#define PEG_RBUTTON_SPACING              10
#define PEG_CBOX_SPACING                 10
#define PEG_BMP_TXT_PADDING               2
#define PEG_MENU_CHK_WIDTH                8
#define PEG_TB_WHITESPACE                 2
#define PEG_SYS_BTN_SIZE                 16
#define PEG_TOOLBAR_PAD_HEIGHT            2
#define PEG_FRAME_WIDTH                   5


/*----------------------------------------------------------------------------*/
// Widget Configuration
/*----------------------------------------------------------------------------*/
#define PEG_CHARTING
#define PEG_HMI_GADGETS
#define PEG_SPREADSHEET


/*----------------------------------------------------------------------------*/
// ImageConvert Configuration
/*----------------------------------------------------------------------------*/
#define PEG_BMP_CONVERT
#define PEG_GIF_CONVERT
#define PEG_JPG_CONVERT
#define PEG_JPG_VIRTUAL_MEMORY
#define PEG_DEFAULT_MAX_JPEG_MEM     0x2710
#define PEG_PNG_DECODER
#define PEG_QUANT
#define PEG_CONVERT_RLECOMP
#define PEG_PIC_FILE_MODE


/*----------------------------------------------------------------------------*/
// File I/O Configuration
/*----------------------------------------------------------------------------*/
#define PEG_DIR_BROWSER
#define PEG_FILE_DIALOG
#define PEG_FILE_CLASS
#define PEG_FILE_ANSI_C
#define PEG_ZIP
#define PEG_UNZIP


/*----------------------------------------------------------------------------*/
// Font Configuration
/*----------------------------------------------------------------------------*/
#define PEG_AA_FONT
#define PEG_OUTLINE_FONT
#define PEG_FONT_INDIRECTION


/*----------------------------------------------------------------------------*/
// String Configuration
/*----------------------------------------------------------------------------*/
#define PEG_UNICODE
#define PEG_STRLIB
#define USE_PEG_LTOA
#define PEG_SJIS_CONVERSION
#define PEG_BIG5_CONVERSION
#define PEGCT_IS_CHAR


/*----------------------------------------------------------------------------*/
// Miscellaneous Configuration
/*----------------------------------------------------------------------------*/
#define PEG_MAX_LINE_OFFSETS            100
#define PEG_MAX_PTR_CAPTURE_NESTING       8
#define PEG_SCREEN_STACK_DEPTH           20
#define PEG_USER_PTR_TYPES                5
#define EXIT_PEG_WHEN_LAST_CLOSED
#define PEG_BTN_INITIAL_REPEAT            1
#define PEG_BTN_REPEAT_RATE               4
#define PEG_DEF_ML_MARKER              0x7c

/*----------------------------------------------------------------------------*/
// This is how many new Viewport or InvalidEntry structures to allocate
// at one time when or if we run out of free entries. We allocate these structures
// in blocks to save time, and we never de-allocate this memory unless PEG is
// terminated.
/*----------------------------------------------------------------------------*/

#define PEG_VIEWPORT_LIST_INC            32



/*----------------------------------------------------------------------------*/
// User Defined Configuration
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
// End of pconfig.hpp file.
/*----------------------------------------------------------------------------*/
